package it.ChiesaMadreRutigliano.www;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

public class ElementiArchitettoniciParticolare extends Activity{
	
	private static final String nomePackage="it.ChiesaMadreRutigliano.www";
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
		setContentView(R.layout.elementiarchitettoniciparticolare);
		getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.barranavigazione);
		Bundle extras = getIntent().getExtras();
		String tag=null;
		if(extras !=null) {
			tag = extras.getString("tag");
			}
		if (tag !=null){
			TextView tv = (TextView) findViewById(R.id.prova);
			String message = (String) getResources().getText(getResources().getIdentifier(tag, "string", nomePackage));
			tv.setText(message);
		}
	}
	
	public void back(View v){
    	Intent myIntent = new Intent(v.getContext(), ElementiArchitettonici.class);
    	startActivityForResult(myIntent, 0);
    	finish();
    }
    public void home(View v){
    	Intent myIntent = new Intent(v.getContext(), ChiesaMadreRutigliano.class);
    	startActivityForResult(myIntent, 0);
    	finish();
    }
    
    public static int getStringIdentifier(Context context, String name) {
        return context.getResources().getIdentifier(name, "string", context.getPackageName());
    }

}
